home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / CDISPLAY / CDISPLAY.C next >
Text File  |  1989-09-07  |  933b  |  41 lines

  1. /******************************************************************************
  2.  CDisplayText.c
  3.  
  4.                             The Static Display Class
  5.         
  6.     Handles displaying strings to the pane..
  7.     
  8.     SUPERCLASS = CStaticText
  9.     
  10.     Copyright ⌐ 1989 Pegasus Technology. All rights reserved.
  11.  
  12.     It is recommend that after you call itsMainPane->AppTextPtr from your
  13.     program, you do a gDesktop->Update to update your window.
  14.  
  15.  ******************************************************************************/
  16.  
  17.  
  18. #include "CDisplayText.h"
  19.  
  20.  
  21.  
  22. /**** Global Variables ****/
  23.  
  24. /*** Class Constants ***/
  25.  
  26.  
  27. /*** Methods ***/
  28.  
  29.  
  30. void    CDisplayText::AppTextPtr(
  31.     Ptr            textPtr,            /* Pointer to some text                    */
  32.     long        numChars)            /* Number of characters in the text        */
  33. {
  34.                                     /* Stuff the text in the Mac TE record    */
  35.     TEInsert(textPtr, numChars, macTE);
  36.     TECalText(macTE);                /* Determine line breaks                */
  37.     AdjustBounds();
  38.     Refresh();                        /* Draw the new text                    */
  39. }    
  40.  
  41.